package com.cloudcreativity.blyg.entity;

import com.cloudcreativity.blyg.utils.StrUtils;

import java.util.List;

public class OrderDetail {

    private List<Info> info;

    public List<Info> getInfo() {
        return info;
    }

    public void setInfo(List<Info> info) {
        this.info = info;
    }

    public class Info{
        private float amount;
        private String brandName;
        private int orderId;
        private int goodsId;
        private int categoryOneId;
        private int categoryTwoId;
        private String unit;
        private String specName;
        private String createTime;
        private int price;
        private String barCode;
        private String goodsName;

        public float getAmount() {
            return amount;
        }

        public void setAmount(float amount) {
            this.amount = amount;
        }

        public String getBrandName() {
            return brandName;
        }

        public void setBrandName(String brandName) {
            this.brandName = brandName;
        }

        public int getOrderId() {
            return orderId;
        }

        public void setOrderId(int orderId) {
            this.orderId = orderId;
        }

        public int getGoodsId() {
            return goodsId;
        }

        public void setGoodsId(int goodsId) {
            this.goodsId = goodsId;
        }

        public int getCategoryOneId() {
            return categoryOneId;
        }

        public void setCategoryOneId(int categoryOneId) {
            this.categoryOneId = categoryOneId;
        }

        public int getCategoryTwoId() {
            return categoryTwoId;
        }

        public void setCategoryTwoId(int categoryTwoId) {
            this.categoryTwoId = categoryTwoId;
        }

        public String getUnit() {
            return unit;
        }

        public void setUnit(String unit) {
            this.unit = unit;
        }

        public String getSpecName() {
            return specName;
        }

        public void setSpecName(String specName) {
            this.specName = specName;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public int getPrice() {
            return price;
        }

        public void setPrice(int price) {
            this.price = price;
        }

        public String getBarCode() {
            return barCode;
        }

        public void setBarCode(String barCode) {
            this.barCode = barCode;
        }

        public String getGoodsName() {
            return goodsName;
        }

        public void setGoodsName(String goodsName) {
            this.goodsName = goodsName;
        }

        public String formatTotal(){
            return String.valueOf(StrUtils.get2BitDecimal(price*amount/100f));
        }
    }
}
